//
//  VOLUME.h
//  Chart
//
//  Created by ma xiaoyang on 6/8/13.
//
//

#ifndef __Chart__VOLUME__
#define __Chart__VOLUME__

#include "Quotation.h"
#include "IndexData.h"

#include <utility>
#include <vector>
#include <string>

namespace ytx
{
    class VOLUME : public IndexData
    {
    public:
        std::vector<std::string> volumeColor;

        VOLUME(IndexConfig indexConfig);

        virtual ~VOLUME();
        
        virtual void calculate(Quotation * data);
        
        virtual void updateLastest(Quotation * data);

        virtual std::string getCrosshairYData(int index);

        virtual UpDropStatus::UpDropStatus getUpDropStatus(int index);

        virtual std::vector<std::pair<std::string, std::string> > getTopSideText(int index) const;
        virtual std::vector<std::pair<double, std::string> > getLeftSideText(int startIndex, int endIndex, const Rectangle & rect, const Style & style) const;

        virtual std::pair<double, double> getDataMinMax(int startIndex, int endIndex) const;

        virtual std::pair<double, double> getAdjustedDataMinMax(int startIndex, int endIndex, const Rectangle & rect) const;

        virtual std::pair<std::string, std::string> getTopSideInfoText() const;
    };
}

#endif /* defined(__Chart__VOLUME__) */
